package com.weihui.jxc.view;
/**
 * 将主界面所有的点击事件抽离出来
 * @author 
 *
 */

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class MainAction {
	/**
	 * 点击跳转到“客户信息管理界面”
	 * @return
	 */
     public static ActionListener clickCustomerInfoManager() {
    	 return new ActionListener() {
			/**
			 * 创建一个子面板
			 * 把字面版放在字面板上
			 * 打印主面板
			 */
			@Override
			public void actionPerformed(ActionEvent e) {
				CustomerInternalFrame cuInternalFrame = new CustomerInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);
				cuInternalFrame.setVisible(true);
			}
		};
     }
     /**
 	 * 点击跳转到“商品信息管理界面”
 	 * @return
 	 */
      public static ActionListener clickGoodsManager() {
    	  System.out.print("跳转了");
     	 return new ActionListener() {
 			/**
 			 * 创建一个子面板
 			 * 把字面版放在字面板上
 			 * 打印主面板
 			 * GoodsInternalFrame
 			 */
     		 
 			@Override
 			public void actionPerformed(ActionEvent e) {
 				GoodsInternalFrame cuInternalFrame = new GoodsInternalFrame();
 				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);
 				cuInternalFrame.setVisible(true);
 			}
 		};
      }
     /**
      * 点击跳转到“客户查询界面”
      * @return
      */
     public static ActionListener clickCustomerInforSearch() {
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				CustomerInforSearchFrame inforSearchFrame = new CustomerInforSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(inforSearchFrame);//停靠
				inforSearchFrame.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“客户查询界面”
      * @return
      */
     public static ActionListener clickProviderInforSearch() {
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ProviderInforSearchFrame inforSearchFrame = new ProviderInforSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(inforSearchFrame);//停靠
				inforSearchFrame.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“客户查询界面”
      * @return
      */
     public static ActionListener clickGoodsInforSearch() {
    	 System.out.print("跳转了商品查询");
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				GoodsInforSearchFrame inforSearchFrame = new GoodsInforSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(inforSearchFrame);//停靠
				inforSearchFrame.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“供应商管理界面”
      * @return
      */
     public static ActionListener clickCustomerInforManager() {
    	 System.out.print("跳转了供应商查询");
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ProviderInternalFrame inforProvider = new ProviderInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(inforProvider);//停靠
				inforProvider.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“进货单”界面
      * @return
      */
     public static ActionListener clickInportInforManager() {
    	 System.out.print("跳转了进货管理");
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				InportInternalFrame pInternalFrame = new InportInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(pInternalFrame);//停靠
				pInternalFrame.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“入库查询界面”
      * @return
      */
     public static ActionListener clickInportInforSearch() {
    	 System.out.print("跳转了入库查询");
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				InportInforSearchFrame inforSearchFrame = new InportInforSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(inforSearchFrame);//停靠
				inforSearchFrame.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“操作员信息管理”界面
      * @return
      */
     public static ActionListener clickOperaterInforManager() {
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				OperatorInternalFrame pInternalFrame = new OperatorInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(pInternalFrame);//停靠
				pInternalFrame.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“更改密码”界面
      * @return
      */
     public static ActionListener clickChangePwdInforManager() {
    	 System.out.print("更改密码界面==========");
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ChangePwdInternalFrame cInternalFrame = new ChangePwdInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cInternalFrame);//停靠
				cInternalFrame.setVisible(true);
				
				
			}
		};
     }
     
     /**
      * 点击跳转到“出库管理O界面”
      * @return
      */
     public static ActionListener clickOutport() {
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				OutportInternalFrame inforSearchFrame = new OutportInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(inforSearchFrame);//停靠
				inforSearchFrame.setVisible(true);
				
			}
		};
     }
     /**
      * 点击跳转到“出库查询界面”
      * @return
      */
     public static ActionListener clickOutportInforSearch() {
    	 System.out.print("跳转了出库查询");
    	 return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				OutportInforSearchFrame inforSearchFrame = new OutportInforSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(inforSearchFrame);//停靠
				inforSearchFrame.setVisible(true);
				
			}
		};
     }
}